<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>The_Set: The_Set.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">The_Set
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">The_Set.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Header file that allows you to work with the set.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;assert.h&gt;</code><br />
</div>
<p><a href="_the___set_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structthe_set__elem.html">theSet_elem</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure of the set.  <a href="structthe_set__elem.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a7c6368b321bd9acd0149b030bb8275ed"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7c6368b321bd9acd0149b030bb8275ed"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_the___set_8h.html#a7c6368b321bd9acd0149b030bb8275ed">boolean</a> { <b>false</b>, 
<b>true</b>
 }</td></tr>
<tr class="memdesc:a7c6368b321bd9acd0149b030bb8275ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">As the library was written in C only, this is convenient enum. <br /></td></tr>
<tr class="separator:a7c6368b321bd9acd0149b030bb8275ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aea3bc990ab5c1d4614f6790b30211847"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_the___set_8h.html#aea3bc990ab5c1d4614f6790b30211847">theSet_construct</a> (struct <a class="el" href="structthe_set__elem.html">theSet_elem</a> **theSet_head)</td></tr>
<tr class="separator:aea3bc990ab5c1d4614f6790b30211847"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a284dec386e806ea1767050a9e1e41d21"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_the___set_8h.html#a284dec386e806ea1767050a9e1e41d21">theSet_destruct</a> (struct <a class="el" href="structthe_set__elem.html">theSet_elem</a> **theSet_head)</td></tr>
<tr class="separator:a284dec386e806ea1767050a9e1e41d21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae026770d6b4b5243c3759e0108bb4fe3"><td class="memItemLeft" align="right" valign="top">enum <a class="el" href="_the___set_8h.html#a7c6368b321bd9acd0149b030bb8275ed">boolean</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_the___set_8h.html#ae026770d6b4b5243c3759e0108bb4fe3">theSet_add</a> (struct <a class="el" href="structthe_set__elem.html">theSet_elem</a> **theSet_head, void *new_elem_t, size_t sizeof_new_elem_t, int(*compare)(const void *p1, const void *p2))</td></tr>
<tr class="separator:ae026770d6b4b5243c3759e0108bb4fe3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7477da12f96ff38c45ae406dabcc7d2f"><td class="memItemLeft" align="right" valign="top">enum <a class="el" href="_the___set_8h.html#a7c6368b321bd9acd0149b030bb8275ed">boolean</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_the___set_8h.html#a7477da12f96ff38c45ae406dabcc7d2f">theSet_delete</a> (struct <a class="el" href="structthe_set__elem.html">theSet_elem</a> **theSet_head, void *elem_to_del, size_t sizeof_elem_t_to_del, int(*compare)(const void *p1, const void *p2))</td></tr>
<tr class="separator:a7477da12f96ff38c45ae406dabcc7d2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Header file that allows you to work with the set. </p>
<dl class="section date"><dt>Date</dt><dd>2014-04-17 22:01:24 +0400 </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Roman Anufriev <a href="#" onclick="location.href='mai'+'lto:'+'mrs'+'pe'+'eds'+'ta'+'lke'+'r@'+'gma'+'il'+'.co'+'m'; return false;">mrspe<span style="display: none;">.nosp@m.</span>edst<span style="display: none;">.nosp@m.</span>alker<span style="display: none;">.nosp@m.</span>@gma<span style="display: none;">.nosp@m.</span>il.co<span style="display: none;">.nosp@m.</span>m</a> <pre class="fragment">       It contains all necessary instruments to correctly work with the
       set.  </pre></dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ae026770d6b4b5243c3759e0108bb4fe3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="_the___set_8h.html#a7c6368b321bd9acd0149b030bb8275ed">boolean</a> theSet_add </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structthe_set__elem.html">theSet_elem</a> **&#160;</td>
          <td class="paramname"><em>theSet_head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>new_elem_t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sizeof_new_elem_t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(*)(const void *p1, const void *p2)&#160;</td>
          <td class="paramname"><em>compare</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>theSet_add</code> - adds an element to the set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">**theSet_head</td><td>address of the pointer to the first element of the set, e.g. address of theSet_head;</td></tr>
    <tr><td class="paramname">*new_elem_t</td><td>address of the element you want to add to the set;</td></tr>
    <tr><td class="paramname">sizeof_new_elem_t</td><td>size of the element you want to add;</td></tr>
    <tr><td class="paramname">*compare(...)</td><td>pointer to the comparing function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the element has been successfully added; false if the element has not been added. </dd></dl>

</div>
</div>
<a class="anchor" id="aea3bc990ab5c1d4614f6790b30211847"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void theSet_construct </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structthe_set__elem.html">theSet_elem</a> **&#160;</td>
          <td class="paramname"><em>theSet_head</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>theSet_construct</code> - constructs good set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">**</td><td>theSet_head address of the pointer to the first element of the set, e.g. address of theSet_head. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7477da12f96ff38c45ae406dabcc7d2f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="_the___set_8h.html#a7c6368b321bd9acd0149b030bb8275ed">boolean</a> theSet_delete </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structthe_set__elem.html">theSet_elem</a> **&#160;</td>
          <td class="paramname"><em>theSet_head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>elem_to_del</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sizeof_elem_t_to_del</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(*)(const void *p1, const void *p2)&#160;</td>
          <td class="paramname"><em>compare</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>theSet_delete</code> - deletes an element from the set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">**theSet_head</td><td>address of the pointer to the first element of the set, e.g. address of theSet_head;</td></tr>
    <tr><td class="paramname">*elem_to_del</td><td>address of the element you want to delete from the set;</td></tr>
    <tr><td class="paramname">sizeof_elem_t_to_del</td><td>size of the element you want to delete;</td></tr>
    <tr><td class="paramname">*compare(...)</td><td>pointer to the comparing function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the element has been successfully deleted; false if the element has not been deleted. </dd></dl>

</div>
</div>
<a class="anchor" id="a284dec386e806ea1767050a9e1e41d21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void theSet_destruct </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structthe_set__elem.html">theSet_elem</a> **&#160;</td>
          <td class="paramname"><em>theSet_head</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>theSet_destruct</code> - destructs a set in a proper way.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">**</td><td>theSet_head address of the pointer to the first element of the set, e.g. adress of theSet_head. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Apr 27 2014 07:24:20 for The_Set by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.7
</small></address>
</body>
</html>
